package com.senlingspace.system.service.impl;

import java.util.List;

import com.senlingspace.common.annotation.DataScope;
import com.senlingspace.common.utils.DateUtils;
import com.senlingspace.common.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjPosMapper;
import com.senlingspace.system.domain.SlkjPos;
import com.senlingspace.system.service.ISlkjPosService;

/**
 * 票务系统Service业务层处理
 * 
 * @author wangliang
 * @date 2024-07-15
 */
@Service
public class SlkjPosServiceImpl implements ISlkjPosService 
{
    @Autowired
    private SlkjPosMapper slkjPosMapper;

    /**
     * 查询票务系统
     * 
     * @param posId 票务系统主键
     * @return 票务系统
     */
    @Override
    public SlkjPos selectSlkjPosByPosId(Long posId)
    {
        return slkjPosMapper.selectSlkjPosByPosId(posId);
    }

    /**
     * 查询票务系统列表
     * 
     * @param slkjPos 票务系统
     * @return 票务系统
     */
    @Override
    public List<SlkjPos> selectSlkjPosList(SlkjPos slkjPos) {
        PageUtils.startPage();
        return slkjPosMapper.selectSlkjPosList(slkjPos);
    }

    /**
     * 新增票务系统
     * 
     * @param slkjPos 票务系统
     * @return 结果
     */
    @Override
    public int insertSlkjPos(SlkjPos slkjPos)
    {
        slkjPos.setCreateTime(DateUtils.getNowDate());
        return slkjPosMapper.insertSlkjPos(slkjPos);
    }

    /**
     * 修改票务系统
     * 
     * @param slkjPos 票务系统
     * @return 结果
     */
    @Override
    public int updateSlkjPos(SlkjPos slkjPos)
    {
        slkjPos.setUpdateTime(DateUtils.getNowDate());
        return slkjPosMapper.updateSlkjPos(slkjPos);
    }

    /**
     * 批量删除票务系统
     * 
     * @param posIds 需要删除的票务系统主键
     * @return 结果
     */
    @Override
    public int deleteSlkjPosByPosIds(Long[] posIds)
    {
        return slkjPosMapper.deleteSlkjPosByPosIds(posIds);
    }

    /**
     * 删除票务系统信息
     * 
     * @param posId 票务系统主键
     * @return 结果
     */
    @Override
    public int deleteSlkjPosByPosId(Long posId)
    {
        return slkjPosMapper.deleteSlkjPosByPosId(posId);
    }
}
